package org.tech4j.captcha.graphical.model;

import org.tech4j.captcha.api.model.CaptchaEntity;
import org.tech4j.captcha.graphical.config.CaptchaGraphicalConfig;

import java.util.concurrent.TimeUnit;
import java.util.function.Function;

/**
 * @program: tech4j
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/4 16:36
 **/
public class GraphicalCaptchaEntity implements CaptchaEntity {

    private String key;

    private String storeType;

    private Long expireAt;

    private Function<CaptchaGraphicalConfig, GraphicalResult> result;

    private TimeUnit timeUnit;

    @Override
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    @Override
    public String getStoreType() {
        return storeType;
    }

    public void setStoreType(String storeType) {
        this.storeType = storeType;
    }

    @Override
    public Long getExpireAt() {
        return expireAt;
    }

    public void setExpireAt(Long expireAt) {
        this.expireAt = expireAt;
    }

    @Override
    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    public void setTimeUnit(TimeUnit timeUnit) {
        this.timeUnit = timeUnit;
    }

    public Function<CaptchaGraphicalConfig, GraphicalResult> getResult() {
        return result;
    }

    public void setResult(Function<CaptchaGraphicalConfig, GraphicalResult> result) {
        this.result = result;
    }
}
